package gui;

import javax.swing.JButton;
import javax.swing.JPanel;

import system.ButtonActionListener;
import system.SystemProperties;

/**
 * @author Kevin Peters
 */
public class ControlPanel extends JPanel {

	private static final long serialVersionUID = 6975797125228538405L;
	private JButton loadDefaultImage;
	private JButton loadCustomImage;
	private JButton saveImage;
	private JButton undo;
	private JButton redo;

	public ControlPanel(ButtonActionListener buttonActionListener) {
		
		loadDefaultImage = new JButton(SystemProperties.LOADDEFAULTIMAGE_LABEL);
		loadDefaultImage.setActionCommand(SystemProperties.LOADDEFAULTIMAGE);
		loadDefaultImage.addActionListener(buttonActionListener);
		add(loadDefaultImage);
		loadCustomImage = new JButton(SystemProperties.LOADCUSTOMIMAGE_LABEL);
		loadCustomImage.setActionCommand(SystemProperties.LOADCUSTOMIMAGE);
		loadCustomImage.addActionListener(buttonActionListener);
		add(loadCustomImage);
		saveImage = new JButton(SystemProperties.SAVE_LABEL);
		saveImage.setActionCommand(SystemProperties.SAVE);
		saveImage.addActionListener(buttonActionListener);
		add(saveImage);
		undo = new JButton(SystemProperties.UNDO_LABEL);
		undo.setActionCommand(SystemProperties.UNDO);
		undo.addActionListener(buttonActionListener);
		add(undo);
		redo = new JButton(SystemProperties.REDO_LABEL);
		redo.setActionCommand(SystemProperties.REDO);
		redo.addActionListener(buttonActionListener);
		add(redo);
	}
}
